package edu.ustb.efws.base.domain;

import io.swagger.annotations.ApiModelProperty;
import org.apache.commons.lang3.builder.ToStringBuilder;

import java.util.Date;
import java.util.Objects;

/**
 * 风险点设置
 *
 * @author TS Group
 */
public class Position {
    @ApiModelProperty("编号")
    private Integer id;
    @ApiModelProperty("温湿度传感器id")
    private Integer thoId;
    @ApiModelProperty("功率变送器id")
    private Integer iptId;
    @ApiModelProperty("该点位知否单独输出温湿度数据，0表示不输出，1表示输出")
    private Integer outTh;
    @ApiModelProperty("风险值输出点编号")
    private String outNumber;
    @ApiModelProperty("风险值输出位置")
    private String riskArea;
    @ApiModelProperty("风险值输出点位置显示")
    private String riskPosition;
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public Integer getThoId() {
        return thoId;
    }

    public void setThoId(Integer thoId) {
        this.thoId = thoId;
    }

    public Integer getIptId() {
        return iptId;
    }

    public void setIptId(Integer iptId) {
        this.iptId = iptId;
    }

    public Integer getOutTh() {
        return outTh;
    }

    public void setOutTh(Integer outTh) {
        this.outTh = outTh;
    }

    public String getOutNumber() {
        return outNumber;
    }

    public void setOutNumber(String outNumber) {
        this.outNumber = outNumber;
    }

    public String getRiskArea() {
        return riskArea;
    }

    public void setRiskArea(String riskArea) {
        this.riskArea = riskArea;
    }

    public String getRiskPosition() {
        return riskPosition;
    }

    public void setRiskPosition(String riskPosition) {
        this.riskPosition = riskPosition;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Position position = (Position) o;
        return Objects.equals(id, position.id) && Objects.equals(thoId, position.thoId) && Objects.equals(iptId, position.iptId) && Objects.equals(outTh, position.outTh) && Objects.equals(outNumber, position.outNumber) && Objects.equals(riskArea, position.riskArea) && Objects.equals(riskPosition, position.riskPosition) && Objects.equals(createTime, position.createTime) && Objects.equals(updateTime, position.updateTime);
    }

    @Override
    public int hashCode() {
        return Objects.hash(id, thoId, iptId, outTh, outNumber, riskArea, riskPosition, createTime, updateTime);
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this)
                .append("id", id)
                .append("thoId", thoId)
                .append("iptId", iptId)
                .append("outTh", outTh)
                .append("outNumber", outNumber)
                .append("riskArea", riskArea)
                .append("riskPosition", riskPosition)
                .append("createTime", createTime)
                .append("updateTime", updateTime)
                .toString();
    }
}